<?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of ThirdPartyLogin
 *
 * @author Administrator
 */
class ThirdPartyLogin extends Homecontroll{
    //put your code here
    private $errorMsg;
    public function __construct() {
        parent::__construct();
         $this->errorMsg = array(
            "20001" => "<h2>配置文件损坏或无法读取，请重新执行intall</h2>",
            "30001" => "<h2>state的值不匹配.你可能是CSRF的攻击者.</h2>",
            "50001" => "<h2>可能是服务器无法请求https协议</h2>可能未开启curl支持,请尝试开启curl支持，重启web服务器，如果问题仍未解决，请联系我们"
            );
    }
    public function showError($code, $description = '$'){
        echo "<meta charset=\"UTF-8\">";
        if($description == "$"){
            die($this->errorMsg[$code]);
        }else{
            exit("<h3>error:</h3>$code"."<h3>msg  :</h3>$description"); 
        }
    }
}
